feat(web): implement SearchQuotientCluster merging 🚂#15516
Open
jahorton wants to merge 1 commit intochange/web/add-same-edge-detectionfrom
Open
feat(web): implement SearchQuotientCluster merging 🚂#15516jahorton wants to merge 1 commit intochange/web/add-same-edge-detectionfrom
jahorton wants to merge 1 commit intochange/web/add-same-edge-detectionfrom
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
1f4897f to
56d7a8f
Compare
407cb6d to
edf4712
Compare
d4f3a18 to
1755556
Compare
This PR serves to implement SearchQuotientCluster.merge() in full. If two halves of a previous .split() operation are passed in, they should be fully remerged - into a single, refused SearchQuotientNode segment. Build-bot: skip build:web Test-bot: skip
edf4712 to
6150186
Compare
ermshiperete
approved these changes
Feb 10, 2026
Comment on lines
+196
to
+197
| thisTailSpaceIds.find((entry) => entry == space.inputSource.subsetId) | ||
| && thisTailInputSource.end == spaceHeadInputSource.start; |
Contributor
There was a problem hiding this comment.
May be better to use Array.some here. Theoretically space.inputSource.subsetId can be 0 in which case Array.find would also return 0 i.e. falsy, and so isOnSplitInput would be false even though it should be true. I'm pretty sure this can't happen in our implementation (even though I don't know why), but using Array.some would be cleaner IMO (or thisTailSpaceIds.find(...) !== undefined)
Suggested change
| thisTailSpaceIds.find((entry) => entry == space.inputSource.subsetId) | |
| && thisTailInputSource.end == spaceHeadInputSource.start; | |
| thisTailSpaceIds.some((entry) => entry == space.inputSource.subsetId) | |
| && thisTailInputSource.end == spaceHeadInputSource.start; |
| // a prior split; if we'd split, it'd be a SearchQuotientCluster on both | ||
| // ends. | ||
| if(space instanceof SearchQuotientSpur) { | ||
| const parentMerge = this.merge(space.parents[0]) as SearchQuotientSpur; |
Contributor
There was a problem hiding this comment.
construct takes a SearchQuotientNode, so there's no need to cast to a SearchQuotientSpur.
Suggested change
| const parentMerge = this.merge(space.parents[0]) as SearchQuotientSpur; | |
| const parentMerge = this.merge(space.parents[0]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR serves to implement SearchQuotientCluster.merge() in full. If two halves of a previous .split() operation are passed in, they should be fully remerged - into a single, refused SearchQuotientNode segment.
Build-bot: skip build:web
Test-bot: skip